﻿using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using iSchool.RabbitMQ.Message;
using ProductManagement.Framework.RabbitMQ;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace iSchool.RabbitMQ.Handle
{
    public class SyncBaseHandle : IEventHandler<SyncBaseMessage>
    {
        private readonly ILogger<SyncBaseHandle> _logger;

        public SyncBaseHandle(ILogger<SyncBaseHandle> logger)
        {
            _logger = logger;
        }

        public Task Handle(SyncBaseMessage message)
        {
            try
            {
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "操作异常,数据:{0}", JsonConvert.SerializeObject(message));
            }
            return Task.CompletedTask;
        }

    }
}
